$('#tickets').html("<%= escape_javascript(render 'admin/topics/tickets') %>");
$('.ticket-stats').html("<%= j render 'admin/topics/ticket_stats' %>");
$('#user-info').html("<%= j render 'admin/users/user_info_horizontal' if @user %>");
$('.view-header').html("<%= t(:results_found, count: number_to_human(@topics.total_count)) %> \"<%= params[:q] %>\"");
$(document).prop('title', "<%= admin_title %> <%= t(:results_found, count:  number_to_human(@topics.total_count)) %>: <%= @status.titleize if @status %>");
history.pushState(null, null, '<%= admin_topic_search_path(q: params[:q], start_date: params[:start_date], end_date: params[:end_date]).html_safe %>');

// Empty ticket search field and show
// $('#q').val('');

// Update timestamps
$('.last-active time[data-time-ago]').timeago();

// Send ping to GA
ga('send', 'pageview');

// jQuery hook
Helpy.ready();
Helpy.track();
Helpy.logHistory();

// RTL changes?
<%= "Helpy.rtl();" if rtl? %>
